package day4;

/**
 * @author oldliu
 * @since 1.0
 */
public class StrTest3 {
    public static void main(String[] args) {
        //charAt
        String s="我喜欢java,他喜欢c#";
        String s1 = s.substring(2);
        System.out.println(s1);
        String s2=s.substring(2,7);//含头不含尾
        System.out.println(s2);
        String s3 = s.replace("喜欢", "like");
        System.out.println(s3);
    }
}
